<template>
  <div class="div">
    <!-- 仅在home中用 -->
    <van-tabs :class=" num ==1 ? 'van1': ''" v-model="active"
      background="transparent" 
        title-active-color="white" 
        title-inactive-color="white"
        line-width="20"
        line-height="5"
        color="white"
     >
      <van-tab v-for = "(item,index) in navs" :key="item.id" :title="item.catename" :to="'/index/cates?num='+index">
      </van-tab>
    </van-tabs>
    <div class="sl"><slot></slot></div>
  </div>
</template>

<script>
export default {
  props:["navs","num"],
  data() {
    return {
      active: 0,
    };
  },
  
};
</script>

<style  scoped>
.div{
 
  position: relative;
}
.van1{
  width: 80vw;
}
.sl{
  position: absolute;
  color: #fff;
  right: .1rem;
  top: .13rem;
  font-size: .14rem;
}

</style>